package cn.edu.scau.dropship.mapper;

import cn.edu.scau.dropship.entity.Wish_list;
import cn.edu.scau.dropship.entity.Wish_listExample;
import java.util.List;
import org.apache.ibatis.annotations.Arg;
import org.apache.ibatis.annotations.ConstructorArgs;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface Wish_listMapper {
    @SelectProvider(type=Wish_listSqlProvider.class, method="countByExample")
    long countByExample(Wish_listExample example);

    @DeleteProvider(type=Wish_listSqlProvider.class, method="deleteByExample")
    int deleteByExample(Wish_listExample example);

    @Delete({
        "delete from wish_list",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into wish_list (id, bvo_id)",
        "values (#{id,jdbcType=INTEGER}, #{bvoId,jdbcType=INTEGER})"
    })
    int insert(Wish_list record);

    @InsertProvider(type=Wish_listSqlProvider.class, method="insertSelective")
    int insertSelective(Wish_list record);

    @SelectProvider(type=Wish_listSqlProvider.class, method="selectByExample")
    @ConstructorArgs({
        @Arg(column="id", javaType=Integer.class, jdbcType=JdbcType.INTEGER, id=true),
        @Arg(column="bvo_id", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
    })
    List<Wish_list> selectByExample(Wish_listExample example);

    @Select({
        "select",
        "id, bvo_id",
        "from wish_list",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ConstructorArgs({
        @Arg(column="id", javaType=Integer.class, jdbcType=JdbcType.INTEGER, id=true),
        @Arg(column="bvo_id", javaType=Integer.class, jdbcType=JdbcType.INTEGER)
    })
    Wish_list selectByPrimaryKey(Integer id);

    @UpdateProvider(type=Wish_listSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Wish_list record, @Param("example") Wish_listExample example);

    @UpdateProvider(type=Wish_listSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Wish_list record, @Param("example") Wish_listExample example);

    @UpdateProvider(type=Wish_listSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Wish_list record);

    @Update({
        "update wish_list",
        "set bvo_id = #{bvoId,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Wish_list record);
}